home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Cream of the Crop 22
/
Cream of the Crop 22.iso
/
program
/
eflibpt4.zip
/
DEMO
/
DEVICES
/
MOUSE2.PAS
< prev
next >
Wrap
Pascal/Delphi Source File
|
1996-08-01
|
1KB
|
33 lines
{ Borland Pascal Extended Function Library - EFLIB (C) Johan Larsson, 1996
Demonstration; mouse handling #2 - double clicking
EFLIB IS PROTECTED BY THE COPYRIGHT LAW AND MAY NOT BE COPIED, SOLD OR
MANIPULATED. FOR MORE INFORMATION, SEE PROGRAM MANUAL! THIS DEMONSTRAT-
ION PROGRAM MAY FREELY BE USED AND DISTRIBUTED. }
uses EFLIBDEF, EFLIBSCR, EFLIBKBD, EFLIBMSE, EFLIBTXT;
const MyField : FieldType = (Start : (X : 1; Y : 1);
Stop : (X : 80; Y : 1));
var DoubleClickHandler : ClickHandlerObjectType;
begin
DoubleClickHandler.Initialize;
Mouse.ShowCursor;
repeat
with DoubleClickHandler, Mouse, Screen do begin
if ButtonPressed then RegisterPress;
if IsDoubleClicked then begin
{ Handle double click }
Write ('Double click');
if IsDoubleClickedInField (MyField) then
WriteLn (' on first line.') else WriteLn ('!');
{ Remove double clicked registration }
DoubleClickHandler.Reset;
end;
repeat until not ButtonPressed;
end;
until Keyboard.KeyPressed;
end.